package com.dycc.libary.router_interceptor;

import com.alibaba.android.arouter.facade.Postcard;
import com.alibaba.android.arouter.facade.annotation.Interceptor;
import com.alibaba.android.arouter.facade.callback.InterceptorCallback;
import com.alibaba.android.arouter.facade.template.IInterceptor;
import com.dycc.libary.util.LogUtil;

/**
 * 登陆状态拦截器
 * Created by wxk on 2018/1/21 0021.
 */
@Interceptor(priority = 1)
public class LoginInterceptor extends BaseInterceptor implements IInterceptor {

    @Override
    protected InterceptorScope initScope() {
        return InterceptorScope.GLOBAL;
    }

    @Override
    public void handle(Postcard postcard, InterceptorCallback callback) {
         //判断是否登陆
        LogUtil.v("LoginInterceptor拦截");
        callback.onContinue(postcard);
    }
}
